<template>
  <div class="list-card">
    <!-- 照片 -->
    <img :src="props.video.cover" alt="" class="cover" style="height: 292px" />

    <!-- 视频按钮 -->
    <i v-show="props.video.isVideo" class="iconfont icon-bofang videoIcon"></i>

    <div class="content-box">
      <!-- 内容 -->
      <div class="content">{{ props.video.title }}</div>

      <!-- 头像/点赞数 -->
      <div class="content-footer flex">
        <div class="item flex">
          <img :src="props.video.img" />
          <span>{{ props.video.name }}</span>
        </div>
        <div class="item flex">
          <i class="iconfont icon-aixin"></i>
          <span>{{ props.video.thumbsUp }}</span>
        </div>
      </div>
    </div>
  </div>
</template>
<script setup>
import { defineProps} from "vue";

const props = defineProps({
  video: {
    type: Object,
    default: () => {},
  },
});
</script>

<style lang="scss" scoped>
.list-card {
  position: relative;
  width: 225.666667px;
  .cover {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
  }

  .videoIcon {
    position: absolute;
    top: 5%;
    right: 5%;
    width: 20px;
    height: 20px;
    color: var(--color-white);
  }

  .cover:hover {
    background-color: var(--color-border);
  }

  .content-box {
    padding: 0 16px;

    .content {
      word-wrap: break-word;
      margin: 10px 0;
      font-weight: 500;
      font-size: 14px;
      color: var(--color-primary-label);
    }

    .content-footer {
      justify-content: space-between;

      .item {
        justify-content: center;
        align-items: center;
        color: var(--color-secondary-label);
        font-size: 12px;
      }

      img {
        height: 20px;
        width: 20px;
        border-radius: 50%;
        margin-right: 5px;
      }

      i {
        margin-right: 5px;
      }
    }
  }
}
</style>